getauthorizationdetails

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > GetAuthorizationDetails

## GetAuthorizationDetails

The GetAuthorizationDetails function returns with the state of a specified Authorization Definition in the currently loaded license. Call this function to find if a definition has been activated, and to retrieve any relevant parameter value. See also: GetAuthorizationDetailsEx.

###### Syntax

HRESULT GetAuthorizationDetails (

long AuthorizationCodeID,
VARIANT_BOOL * Activated,
long * ParameterValue,
long * return_code

);

###### Parameters

AuthorizationCodeID

[IN] Numeric value identifying the Authorization ID in the currently loaded license for which you wish to retrieve the details. (Values are 0 to 63 inclusive).

Activated

[OUT] This is (a pointer to) a boolean value that returns with the state of the "activated" field of the corresponding Authorization Definition (if any). Will return holding true if the code has been previously activated, false otherwise.

ParameterValue

[OUT] Numeric value (a pointer to) returns with the stored parameter field of the corresponding Authorization Definition (if any).

return_code

[OUT] This is (a pointer to) a numeric value that returns with a RETURNCODE that identifies the outcome of the operation. (See remarks section below for details.)

###### Remarks

Note: This function is illustrated in the SoftwareShield Flowcharts - (see flow chart #2).

Call GetAuthorizationDetails when you need to determine the state of one of the licenses Authorization Definitions. In particular, if it is activated or not and what, if any, parameter value is stored inside it.

The return_code parameter returns with a RETURNCODE that identifies the outcome of the operation. If the license has not been initialized successfully with a call to StartUp, the function will return with return_code holding FALSE_LICENSE_NOT_INITIALIZED. Otherwise, it will hold FALSE_CODE_OUT_OF_RANGE if the AuthorizationCodeID specified is not between 0 and 63 inclusive. It will hold FALSE_CODE_NOT_ACTIVATED if the AuthorizationCodeID specified does not exist or has not been activated. It will hold TRUE_CODE_ACTIVATED currently has its "activated" field set to true.

If the AuthorizationCodeID represents a valid Authorization Definition for the currently loaded license, then the ParameterValue will return with the currently stored parameter value for that definition. Note that because you can preset a parameter value (for General Use definitions) as well as set the parameter value at run-time, the definition itself does not have to have been activated with an Activation Code for the ParameterValue to contain something other than zero.

###### Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"